home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Programming / AmigaTalk / examples / file.st < prev    next >
Text File  |  1998-09-30  |  385b  |  17 lines

  1. Class Main
  2. [
  3.    main      | f g |
  4.       f <- File new ; open: 'file.st'.
  5.       g <- File new ; open: 'foo' for: 'w'.
  6.       f do: [:x | g write: x reversed].
  7.       g <- File new ; open: 'foo' for: 'r'.
  8.       g do: [:x | x print].
  9.       f modeCharacter.
  10.       f first print.
  11.       10 timesRepeat: [ f next print ].
  12.       (f at: 2) print.
  13.       f currentKey print.
  14.       f size print.
  15. ]
  16.  
  17.